<div class="main">
  <a [routerLink]="['/home']">主页</a>
  <a [routerLink]="['/product']" [queryParams]="{id: 1}">商品详情</a>
  <a [routerLink]="['/product1', 1]">商品详情1</a>
  <a [routerLink]="['/product2', 99]">商品详情2</a>
  <input type="button" value="商品详情" (click)="toProductDetails()">
  <a [routerLink]="[{outlets: {primary: 'home', aux: 'chat'}}]">开始聊天</a>
  <a [routerLink]="[{outlets: {aux: 'chat'}}]">开始聊天1</a>
  <a [routerLink]="[{outlets: {aux: null}}]">结束聊天</a>
</div>
  <router-outlet></router-outlet>
  <router-outlet name="aux"></router-outlet>
